<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link href="css/Untitled-1.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="user.js"></script>

<script type="text/javascript">
window.onload =function(){
	var aname = document.getElementById('name');
	var apassword = document.getElementById('password');
	var aTheLogin = document.getElementById('TheLogin');
	var anot = document.getElementById('not')
 	aTheLogin.onclick=function(){
	  for(var i=0;i<user.length;i++){
		
          
		if(user[i].account==aname.value&&user[i].account==password.value){
            alert("登陆成功");
			anot.style.display='none';
        	break
			}else{
		  	if(user[i].account!=aname.value&&user[i].account!=password.value){
				anot.style.display='block';
			}
			}
	  }
				
	}


}


</script>

</head>
<body>

<div id="kuai">
<div id="kuai-1"></div>
<p>账号</p><input id="name" type="text" value=""/>
<p>密码</p><input id="password" type="text" value=""/>
<span id="not">账号或密码输入错误</span>
<input id="TheLogin" type="button" value="登录"/>

</div>
</body>

</html>